package java_1_21;

/**
 * @author 美女
 * @date 2022/03/22 23:06
 * 内部类和泛型
 **/
public class MyOutter<T> {
    // 成员内部类
    private class Inner{
        public void test(T t2) {
            System.out.println(t2);
        }
    }
    // 静态内部类
    private static class Inner1<T> {
        public void fun(T t1) {
            System.out.println(t1);
        }
    }
    public static void main(String[] args) {
        MyOutter<String> outter = new MyOutter();
        MyOutter<String>.Inner inner = outter.new Inner();
        inner.test("123");
        // error
//        inner.test(123);
        MyOutter.Inner1<Integer> inner1 = new Inner1<>();
        inner1.fun(123);
    }
}
